#include <iostream>
#include <cmath>
#include <algorithm>
#include <cstring>
#include <vector>
#include <map>
#include <queue>
#include <cstdio>
#include <string>
#include <stack>
#include <set>
#define IOS ios::sync_with_stdio(false), cin.tie(0)
using namespace std;
typedef long long ll;
ll a[100010];
bool p[1000100];
int main()
{
    IOS;
    ll n;
    cin>>n;
    for(ll i=1;i<=n;i++){
        cin>>a[i];
    }
    p[a[1]]=true;
    ll minn=a[1]+1;
    for(ll i=2;i<=n;i++){
        if(p[a[i]]){
            if(a[i]<minn){
                a[i]=minn;
                while(p[++minn]);
            }
            else {
                while(p[a[i]]){
                    a[i]++;
                }
            }
        }
        else {
            if(a[i]<=minn){
                minn=a[i];
                while(p[++minn]);
            }
        }
        p[a[i]]=true;
    }
    cout<<a[1];
    for(ll i=2;i<=n;i++){
        cout<<" "<<a[i];
    }
    cout<<endl;
    getchar();
    getchar();
    return 0;
}
